package org.example.read;

import java.io.File;

/**
 * 读取文件夹
 */
public class ReadDirs {
    public static void main(String[] args) {
        File file = new File("D:\\01MyFile\\06中汇\\06git\\rulepre.prod\\NBUWBOM\\资源");
        if(file.isDirectory()){
            File[] files = file.listFiles();
            for (File file1 : files) {
                System.out.println(file1.getName());
            }
        }else{
            System.out.println("不是一个目录");
        }
    }
}
